package swingOutput;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Label;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class InfoPanel extends JPanel {
	JButton btn;
	JLabel label;
	
	public InfoPanel() {
		setLayout(new GridBagLayout());
		GridBagConstraints c = new GridBagConstraints();
		
		label = new JLabel();
		label.setText("Some text");
		btn = new JButton();
		btn.setText("Some btn");
		
		c.weightx = 0.5;
		c.weighty = 0.5;
		
		c.fill = GridBagConstraints.CENTER;
		c.gridx = 0;
		c.gridy = 0;
		add(label, c);
		
		c.ipady = 15;
		c.gridx = 0;
		c.gridy = 1;
		add(btn, c);
	}
}
